<template>
	<view class="no-content">
		<image :src="iconSrc" mode=""></image>
		<text>{{text}}</text>
	</view>
</template>

<script>
	export default {
		props: {
			showType: {
				type: String,
				default: ''
			},
			tips:{
				type: String,
				default: ''
			}
		},
		computed: {
			iconSrc() {
				return 'https://xarkbucket.oss-cn-hangzhou.aliyuncs.com/%E5%85%8D%E5%8D%95%E9%80%9AApp/no-' + this.showType + '.png'
			},
			text() {
				// exploit ~~ 正在开发中，敬请期待
				// orders ~~ 暂无订单
				// shopCar ~~ 购物车为空
				// shops ~~ 暂无商家
				// exchange ~~ 暂无收藏
				// search ~~ 没有符合的结果
				// internet ~~ 网络有误
				// message ~~ 暂无消息
				// data ~~ 暂无数据
				// card ~~ 暂无卡片
				var type = this.showType
				var that = this
				switch (type) {
					case 'exploit':
						return that.tips?that.tips:'正在开发中，敬请期待'
					case 'orders':
						return that.tips?that.tips:'还没有订单，快去消费参与抽奖吧'
					case 'shopCar':
						return that.tips?that.tips:'购物车空空如也，快去添加商品吧~'
					case 'shops':
						return that.tips?that.tips:'没找到商家哦'
					case 'exchange':
						return that.tips?that.tips:'没有藏品哦，快去收藏'
					case 'search':
						return that.tips?that.tips:'没有符合条件的结果'
					case 'internet':
						return that.tips?that.tips:'网络走掉了~！'
					case 'message':
						return that.tips?that.tips:'您还没有消息~！'
					case 'card2':
						return that.tips?that.tips:'帮好友助力有几率获得卡片哦~！'
					case 'address':
						return that.tips?that.tips:'赶快添加收货地址吧~'
					default:
						return that.tips?that.tips:'商家还没有添加商品~！'
				}
			}
		}
	}
</script>

<style>
	
	.no-content{
		width: 100%;
		height: 300rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	
	.no-content image{
		width: 200rpx;
		height: 200rpx;
		margin-bottom: 20rpx;
	}
	
	.no-content text{
		font-size: 26rpx;
		color: #999999;
	}
</style>
